package com.ahau.controller;

import com.ahau.pojo.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Random;

@RestController
@RequestMapping("/ctrlA")
public class ControllerA {

    @Autowired
    private Person person;

    @GetMapping("/f1")
    public String f1(){
        System.out.println("开始循环");
        return "<h1>ni hao ~</h1>";
    }

    @GetMapping("f2")
    public Person f2(){
        return person;
    }
}
